package com.example.demo.demos.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;

@Controller
public class Controller_ {
    private Service_ service;
    public Controller_(){

    }
//    public Controller_(Service_ service){
//        this.service = service;
//    }
//    public Controller_(Service_ service, User user){
//        this.service = service;
//    }
    @Autowired
    public void setService(Service_ service) {
        this.service = service;
    }
    public void sayHi(){
        System.out.println("Hi!!! controller");
        service.sayHi();
    }
}
